import request from "@/utils/request"

export default {
  // 列表
  query(data) {
    return request({
      baseURL: window.APP_GETEWAY.owpmc,
      url: `/v1/purchase-demand/sale-estimate/list`,
      method: "post",
      data,
    })
  },
  // 更新预估数据
  update(data) {
    return request({
      baseURL: window.APP_GETEWAY.owpmc,
      url: `/v1/purchase-demand/sale-estimate/update-estimate`,
      method: "post",
      data,
    })
  },
  // 销售趋势
  sale(data) {
    return request({
      baseURL: window.APP_GETEWAY.owpmc,
      url: `/v1/purchase-demand/sale-estimate/sale-trend`,
      method: "post",
      data,
    })
  },
  // 清空 type 1日常销量2活动销量
  clear(data) {
    return request({
      baseURL: window.APP_GETEWAY.owpmc,
      url: `/v1/purchase-demand/sale-estimate/clear`,
      method: "post",
      data,
    })
  },
  // 设置运输方式
  setType(data) {
    return request({
      baseURL: window.APP_GETEWAY.owpmc,
      url: `/v1/purchase-demand/sale-estimate/set-transport-type`,
      method: "post",
      data,
    })
  },
}
